import request from '@/utils/request'

//审批后查询
export function lists() {
  return request({
    url: '/equipment/equipment/lists',
    method: 'get'

  })
}

export function baoyangs(data) {
  return request({
    url: '/equipment/equipment/editUpdate',
    method: 'put',
    data: data
  })
}


// 查询设备列表列表
export function listEquipment(query) {
  return request({
    url: '/equipment/equipment/list',
    method: 'get',
    params: query
  })
}

// 查询设备列表详细
export function getEquipment(equipmentId) {
  return request({
    url: '/equipment/equipment/' + equipmentId,
    method: 'get'
  })
}

// 新增设备列表
export function addEquipment(data) {
  return request({
    url: '/equipment/equipment',
    method: 'post',
    data: data
  })
}
//审批操作
export function approverEquipment(data) {
  return request({
    url: '/equipment/equipment/approver',
    method: 'put',
    data: data
  })
}

//审核操作
export function auditEquipment(data) {
  return request({
    url: '/equipment/equipment/audit',
    method: 'put',
    data: data
  })
}
//保养
export function maintainEquipment(data) {
  return request({
    url: '/equipment/equipment/maintain',
    method: 'put',
    data: data
  })
}

// 修改设备列表
export function updateEquipment(data) {
  return request({
    url: '/equipment/equipment',
    method: 'put',
    data: data
  })
}

// 删除设备列表
export function delEquipment(equipmentId) {
  return request({
    url: '/equipment/equipment/' + equipmentId,
    method: 'delete'
  })
}
